package com.linyf.design.chain;

import com.linyf.design.chain.dto.Request;
import com.linyf.design.chain.dto.Response;

/**
 * @Author: linyf
 * @Description: TODO
 * @DateTime: 2023/4/26 9:57
 **/
public class RequestThreeHandler extends Handler{
    @Override
    protected boolean canHandler(Request request) {
        return "three".equalsIgnoreCase(request.getRequest());
    }

    @Override
    protected Response execHandler(Request request) {
        final Response response = new Response();
        response.setResult(request.getRequest() + "three");
        return response;
    }

}
